<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/CMS.Master" Inherits="Shop.Framework.Page.CMS_ProductDetailPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<title><%=ProductDetail.Name%> Detail</title>
	<link href="/content/productDetailCss.css" type="text/css" rel="Stylesheet" />
    <style type="text/css">
    
        .product-detail-information{
            width: 397px
        }
        .label-style
        {
            width: 137px;
            border:solid thin Gray;
            background-color:Silver;
        }
        
        .product-detail-information td{
              padding:3px;
        }
        
        
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="product-form-wrapper left">
        <%if (ProductDetail.IdProduct != 0) { %>
        <a href="/cms/maintainance/get-images/<%=ProductDetail.IdProduct %>">Go to image list</a>
        <%} %>
        
        <form id="productDetail" action="/cms/maintainance/product/save" method="post">
            <table class="product-detail-information">
            
            <tr>
                <input type="hidden" name="idProduct" value="<%=ProductDetail.IdProduct %>" />
                <input type="hidden" name="idCategory" value="<%=IdCategory %>" />
                <td class="label-style"><label for="name">Name</label></td>
                <td><input name="name" type="text" value="<%=ProductDetail.Name %>" 
                        style="width: 246px"/></td>
            </tr>                            
            <tr>
                
                <td class="label-style"><label for="description">Description</label></td>
                <td><textarea name="description"
                        style="width: 245px"><%=ProductDetail.Description %></textarea></td>
            </tr>
            
            <tr>
                
                <td class="label-style"><label for="idDesigner">Designer</label></td>
                <td>
                    <select name="idDesigner" style="width: 243px">
                     <%foreach (var d in DesignerList) { %>
                        <option value="<%=d.IdDesigner %>"><%=d.Name %> </option>
                     <%} %>
                    </select>
                </td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="tags">Tags</label></td>
                <td><input name="tags" type="text" value="<%=ProductDetail.Tags %>" 
                        style="width: 245px; height: 58px;"/></td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="keywords">Keywords</label></td>
                <td><input name="keywords" type="text" value="<%=ProductDetail.Keywords %>" 
                        style="width: 245px; height: 57px;"/></td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="title">Title</label></td>
                <td><input name="title" type="text" value="<%=ProductDetail.Title %>" 
                        style="width: 245px;"/></td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="price">Price</label></td>
                <td><input name="price" type="text" value="<%=ProductDetail.Price.ToString("#0.00") %>" 
                        style="width: 245px;"/></td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="taxedPrice">Taxed Price</label></td>
                <td><input name="taxedPrice" type="text" value="<%=ProductDetail.TaxedPrice.ToString("#0.00") %>" 
                        style="width: 245px;"/></td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="isDeleted">Deleted</label></td>
                <td>
                    <select name="isDeleted">
                      <%if (ProductDetail.IsDeleted) {%>
                        <option value="true">Yes</option>
                        <option value="false">No</option>
                      <%} else {%>
                        <option value="false">No</option>
                        <option value="true">Yes</option>                        
                      <%} %>
                    </select>
                </td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="isViewable">Available for view</label></td>
                <td>
                    <select name="isViewable">
                      <%if (ProductDetail.IsViewable) {%>
                        <option value="true">Yes</option>
                        <option value="false">No</option>
                      <%} else {%>
                        <option value="false">No</option>
                        <option value="true">Yes</option>                        
                      <%} %>
                    </select>
                </td>
            </tr>
            
            <tr>
                <td class="label-style"><label for="dateAdded">Date Added/Modified</label></td>
                <td><input name="dateAdded" type="text" disabled="disabled" value="<%=ProductDetail.DateEncoded %>" 
                        style="width: 245px;"/></td>
            </tr>
                        
            <tr>
                <td colspan="2"><input type="submit" value="Save Changes"/></td>
            </tr>
                        
            </table>
            
        </form>
        <br />
        <a class="nav_link" onclick="history.go(-1)">Back to previous</a>
        
    </div>

</asp:Content>
